#pragma once

#include <opencv2\opencv.hpp>
#include <time.h>

#include "SupervisedLearning.h"
#include "MLAlgo.h"
#include "KeySort.h"
#include "MLEvaluation.h"

using namespace cv;
using namespace std;

class DTree : public SupervisedLearning
{
private:
	CvDTree dtree;
	CvDTreeParams params;
	Mat type;
	typedef SupervisedLearning super;
	float getROCevaluation(Mat& d, Mat& l);

public:
	DTree();
	DTree(int numRows, int numAttributes);
	virtual void train();
	virtual void train_auto();
	virtual float predict(Mat& sample);
	virtual void constructConfusionMatrix();
	Mat runGeneticAlgorithm();
	Mat createConfusionMatrix(Mat& d, Mat& l, int k);
};